package ru.st.selenium.pages;

//import static org.openqa.selenium.support.ui.ExpectedConditions.presenceOfElementLocated;

//import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;

public class FilmListPage extends InternalPage {

	@FindBy(css = "nav a[href $= './?go=add']")
	private WebElement addMovieButton;

	public FilmListPage(PageManager pages) {
		super(pages);
	}

	public FilmAddPage clickAddMovie() {
		addMovieButton.click();
		return pages.filmAddPage;
	}

	// public FilmViewPage ensurePageLoaded() {
	// super.ensurePageLoaded();
	// wait.until(presenceOfElementLocated(By.id("nav")));
	// return this;
	// }
}
